package com.zy.shiro.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.shiro.domain.SysRole;
import com.zy.shiro.domain.SysUser;
import com.zy.vo.SysUserVo;

import java.util.List;

public interface SysUserService extends IService<SysUser> {

  /**
   * 通过用户名查询用户
   * @param username
   * @return
   */
  SysUser findUserByusername(String username);

  /**
   * 查询角色
   * @param userId
   * @return
   */
  List<String> queryRoleByUserId(Long userId);

  /**
   * 查询权限
   * @param userId
   * @return
   */
  List<String> queryPermissionByUserId(Long userId);

  /**
   * 通过用户名和密码查找用户
   * @param username
   * @param pwd
   * @return
   */
  SysUser selectUser(String username, String pwd);

  /**
   * 分页查询用户
   * @param page
   * @param SysUser
   * @return
   */
  IPage<SysUser> queryAllUser(Page<SysUser> page, SysUserVo sysUserVo);
}
